.class public Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;
.super Lcom/waiqin365/lightapp/kehu/view/CMCustomView;

# interfaces
.implements Ljava/util/Observer;


# instance fields
.field private a:Landroid/content/Context;

.field private b:Landroid/widget/ImageView;

.field private c:Landroid/widget/TextView;

.field private d:Landroid/widget/TextView;

.field private e:Landroid/widget/ImageView;

.field private f:Landroid/widget/ImageView;

.field private g:Landroid/widget/LinearLayout;

.field private h:Landroid/view/View;

.field private i:Ljava/util/ArrayList;

.field private s:Lcom/waiqin365/lightapp/kehu/b/cj;

.field private t:Z


# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 3

    invoke-direct {p0, p1, p2}, Lcom/waiqin365/lightapp/kehu/view/CMCustomView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->t:Z

    iput-object p1, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->a:Landroid/content/Context;

    invoke-static {p1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    const v1, 0x7f03008c

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v1

    const v0, 0x7f0c0083

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->b:Landroid/widget/ImageView;

    const v0, 0x7f0c0084

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->c:Landroid/widget/TextView;

    const v0, 0x7f0c0085

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->d:Landroid/widget/TextView;

    const v0, 0x7f0c0086

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->e:Landroid/widget/ImageView;

    const v0, 0x7f0c0087

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->f:Landroid/widget/ImageView;

    const v0, 0x7f0c005a

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->h:Landroid/view/View;

    const v0, 0x7f0c0082

    invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->g:Landroid/widget/LinearLayout;

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->g:Landroid/widget/LinearLayout;

    new-instance v2, Lcom/waiqin365/lightapp/kehu/view/s;

    invoke-direct {v2, p0}, Lcom/waiqin365/lightapp/kehu/view/s;-><init>(Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;)V

    invoke-virtual {v0, v2}, Landroid/widget/LinearLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    invoke-virtual {p0, v1}, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->addView(Landroid/view/View;)V

    return-void
.end method

.method private a(Lcom/waiqin365/lightapp/kehu/b/cj;)V
    .locals 2

    if-eqz p1, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->d:Landroid/widget/TextView;

    iget-object v1, p1, Lcom/waiqin365/lightapp/kehu/b/cj;->c:Ljava/lang/String;

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    :cond_0
    return-void
.end method

.method static synthetic a(Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;)V
    .locals 0

    invoke-direct {p0}, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->e()V

    return-void
.end method

.method private e()V
    .locals 3

    invoke-static {}, Lcom/waiqin365/lightapp/view/a/b;->a()Ljava/util/Observable;

    move-result-object v0

    invoke-virtual {v0, p0}, Ljava/util/Observable;->addObserver(Ljava/util/Observer;)V

    new-instance v0, Landroid/content/Intent;

    iget-object v1, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->a:Landroid/content/Context;

    const-class v2, Lcom/waiqin365/lightapp/kehu/CMStoreRoleSelectActivity;

    invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string/jumbo v1, "roles"

    iget-object v2, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->i:Ljava/util/ArrayList;

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/io/Serializable;)Landroid/content/Intent;

    const-string/jumbo v1, "selectRole"

    iget-object v2, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->s:Lcom/waiqin365/lightapp/kehu/b/cj;

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/io/Serializable;)Landroid/content/Intent;

    const-string/jumbo v1, "returnTo"

    iget-object v2, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->n:Ljava/lang/String;

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    iget-object v1, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->a:Landroid/content/Context;

    invoke-virtual {v1, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    return-void
.end method


# virtual methods
.method public c()Ljava/lang/CharSequence;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->c:Landroid/widget/TextView;

    invoke-virtual {v0}, Landroid/widget/TextView;->getText()Ljava/lang/CharSequence;

    move-result-object v0

    invoke-interface {v0}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public d()Ljava/lang/CharSequence;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->s:Lcom/waiqin365/lightapp/kehu/b/cj;

    if-nez v0, :cond_0

    const-string/jumbo v0, ""

    :goto_0
    return-object v0

    :cond_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->s:Lcom/waiqin365/lightapp/kehu/b/cj;

    iget-object v0, v0, Lcom/waiqin365/lightapp/kehu/b/cj;->b:Ljava/lang/String;

    goto :goto_0
.end method

.method public setBottomLineStatus(Z)V
    .locals 2

    iget-object v1, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->h:Landroid/view/View;

    if-eqz p1, :cond_0

    const/4 v0, 0x0

    :goto_0
    invoke-virtual {v1, v0}, Landroid/view/View;->setVisibility(I)V

    return-void

    :cond_0
    const/16 v0, 0x8

    goto :goto_0
.end method

.method public setEdit(Z)V
    .locals 2

    iput-boolean p1, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->t:Z

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->d:Landroid/widget/TextView;

    invoke-virtual {v0, p1}, Landroid/widget/TextView;->setEnabled(Z)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->d:Landroid/widget/TextView;

    invoke-virtual {v0, p1}, Landroid/widget/TextView;->setFocusable(Z)V

    iget-boolean v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->t:Z

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->b:Landroid/widget/ImageView;

    const/4 v1, 0x4

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    :cond_0
    return-void
.end method

.method public setLabel(Ljava/lang/CharSequence;)V
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->c:Landroid/widget/TextView;

    invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    return-void
.end method

.method public setMustinput(Ljava/lang/String;)V
    .locals 2

    invoke-super {p0, p1}, Lcom/waiqin365/lightapp/kehu/view/CMCustomView;->setMustinput(Ljava/lang/String;)V

    const-string/jumbo v0, "1"

    invoke-virtual {v0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    iget-boolean v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->t:Z

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->b:Landroid/widget/ImageView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    :cond_0
    return-void
.end method

.method public setValue(Ljava/lang/String;)V
    .locals 2

    const/4 v0, 0x0

    move v1, v0

    :goto_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->i:Ljava/util/ArrayList;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->i:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-ge v1, v0, :cond_1

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->i:Ljava/util/ArrayList;

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/kehu/b/cj;

    iget-object v0, v0, Lcom/waiqin365/lightapp/kehu/b/cj;->b:Ljava/lang/String;

    invoke-virtual {v0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->i:Ljava/util/ArrayList;

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/kehu/b/cj;

    iget-object v0, v0, Lcom/waiqin365/lightapp/kehu/b/cj;->c:Ljava/lang/String;

    invoke-virtual {v0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_2

    :cond_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->i:Ljava/util/ArrayList;

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/kehu/b/cj;

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->s:Lcom/waiqin365/lightapp/kehu/b/cj;

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->s:Lcom/waiqin365/lightapp/kehu/b/cj;

    invoke-direct {p0, v0}, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->a(Lcom/waiqin365/lightapp/kehu/b/cj;)V

    :cond_1
    return-void

    :cond_2
    add-int/lit8 v0, v1, 0x1

    move v1, v0

    goto :goto_0
.end method

.method public setValueItems(Ljava/lang/String;)V
    .locals 6

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->i:Ljava/util/ArrayList;

    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_0

    :try_start_0
    new-instance v1, Lorg/json/JSONArray;

    invoke-direct {v1, p1}, Lorg/json/JSONArray;-><init>(Ljava/lang/String;)V

    const/4 v0, 0x0

    :goto_0
    if-eqz v1, :cond_0

    invoke-virtual {v1}, Lorg/json/JSONArray;->length()I

    move-result v2

    if-ge v0, v2, :cond_0

    invoke-virtual {v1, v0}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v2

    new-instance v3, Lcom/waiqin365/lightapp/kehu/b/cj;

    invoke-direct {v3}, Lcom/waiqin365/lightapp/kehu/b/cj;-><init>()V

    const-string/jumbo v4, "role_auth"

    const-string/jumbo v5, ""

    invoke-virtual {v2, v4, v5}, Lorg/json/JSONObject;->optString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v3, Lcom/waiqin365/lightapp/kehu/b/cj;->a:Ljava/lang/String;

    const-string/jumbo v4, "role_id"

    const-string/jumbo v5, ""

    invoke-virtual {v2, v4, v5}, Lorg/json/JSONObject;->optString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v3, Lcom/waiqin365/lightapp/kehu/b/cj;->b:Ljava/lang/String;

    const-string/jumbo v4, "role_name"

    const-string/jumbo v5, ""

    invoke-virtual {v2, v4, v5}, Lorg/json/JSONObject;->optString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    iput-object v2, v3, Lcom/waiqin365/lightapp/kehu/b/cj;->c:Ljava/lang/String;

    iget-object v2, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->i:Ljava/util/ArrayList;

    invoke-virtual {v2, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    :cond_0
    return-void
.end method

.method public setViewIgnore(Z)V
    .locals 1

    if-eqz p1, :cond_0

    const/16 v0, 0x8

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->setVisibility(I)V

    :goto_0
    return-void

    :cond_0
    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->setVisibility(I)V

    goto :goto_0
.end method

.method public update(Ljava/util/Observable;Ljava/lang/Object;)V
    .locals 2

    if-eqz p2, :cond_0

    instance-of v0, p2, Lcom/waiqin365/lightapp/view/a/a;

    if-eqz v0, :cond_0

    iget-object v1, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->n:Ljava/lang/String;

    move-object v0, p2

    check-cast v0, Lcom/waiqin365/lightapp/view/a/a;

    iget-object v0, v0, Lcom/waiqin365/lightapp/view/a/a;->a:Ljava/lang/String;

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    move-object v0, p2

    check-cast v0, Lcom/waiqin365/lightapp/view/a/a;

    iget-object v0, v0, Lcom/waiqin365/lightapp/view/a/a;->b:Ljava/lang/Object;

    if-eqz v0, :cond_0

    check-cast p2, Lcom/waiqin365/lightapp/view/a/a;

    iget-object v0, p2, Lcom/waiqin365/lightapp/view/a/a;->b:Ljava/lang/Object;

    check-cast v0, Lcom/waiqin365/lightapp/kehu/b/cj;

    invoke-static {}, Lcom/waiqin365/lightapp/view/a/b;->a()Ljava/util/Observable;

    move-result-object v1

    invoke-virtual {v1, p0}, Ljava/util/Observable;->deleteObserver(Ljava/util/Observer;)V

    iput-object v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->s:Lcom/waiqin365/lightapp/kehu/b/cj;

    iget-object v0, p0, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->s:Lcom/waiqin365/lightapp/kehu/b/cj;

    invoke-direct {p0, v0}, Lcom/waiqin365/lightapp/kehu/view/CMStoreRoleSelectView_vertical;->a(Lcom/waiqin365/lightapp/kehu/b/cj;)V

    :cond_0
    return-void
.end method
